import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    allDrawingList: [],
    detailIndex: 0
  },
  mutations: {
    // 初始化全部的图纸
    setdrawingList (state, paramsList) {
      state.allDrawingList = paramsList[0]
    },
    // 修改当前的详情页对应的索引号
    setDetailIndex (state, paramsList) {
      state.detailIndex = paramsList[0]
    }
  },
  actions: {}
})
